﻿@model Bieb.Web.Models.Books.ViewBookModel

@if (Model != null)
{
    <p>
        @Html.ActionLink(Model.Title, "Details", new { id = Model.Id })
        @if (Model.Authors.Count() <= 3 && Model.Authors.Any())
        {
            @Html.Raw("(")
            @BiebResources.BookStrings.WrittenBy
            @Html.Raw(" ")
            @Html.Raw(@String.Join(", ", Model.Authors.Select(person => Html.ActionLink(person.Text, "Details", new { id=person.Id, controller="People" }))))
            @Html.Raw(")")
        }
        @BiebResources.BookStrings.WasRecentlyAdded.
    </p>
}
else
{
    <p>@BiebResources.BookStrings.NoBooksInDatabase</p>
}